﻿#include <bits/stdc++.h>
using namespace std;
int a[7];
bool d(int n) {
    if (n % 400 == 0) {
        return true;
    }if (n % 100 != 0 && n % 4 == 0) {
        return true;
    }
    return false;
}
int main() {
    int t = 1, n, m[12] = { 31,28,31,30,31,30,31,31,30,31,30,31 };
    cin >> n;
    for (int i = 1900; i < n + 1900; i++) {
        if (d(i)) {
            m[1] = 29;
        }
        else {
            m[1] = 28;
        }
        for (int j = 0; j < 12; j++) {
            for (int k = 1; k <= m[j]; k++) {
                t++;
                if (t == 8) {
                    t = 1;
                }
                if (k == 13) {
                    a[t - 1]++;
                }
            }
        }
    }
    cout << a[6] << ' ';
    for (int j = 0; j < 6; j++) {
        cout << a[j] << ' ';
    }
    return 0;
}